package org.example.studyonline.pojo.DTO;


import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class RegisterDTO {
    @NotEmpty
    @Pattern(regexp = "^\\S{4,16}$", message = "用户名长度必须在4到16位之间，且不能包含空格")
    private String name;
    @NotEmpty
    @Pattern(regexp = "^\\S{4,16}$", message = "密码长度必须在4到16位之间，且不能包含空格")
    private String password;
    @NotEmpty
    @Email
    private String email;
}
